Good morning, welcome for computer graphics.
Today we will hopefully finalize the step to go from 2D to 3D.
So on Tuesday, no on Monday I already started with explaining how we can project 3D objects
to 2D images mimicking standard cameras.
And we saw that the correct way to generate images like a camera does or like the human
eye does is to take a point projection.
So we have our 3D object, we have a camera positioned somewhere in space and then we
generate rays in some sense from the object points to the eye and where these ray intersect
an image plane this is the position where we draw our image point.
So it's a point projection.
And the shape that contains all points that are projected onto a particular image is called
the view frustum and all points within that view frustum are then projected into our image
and this generates these perspective drawings or perspective images that we know.
Distant objects get smaller in the image and all these effects, parallel lines don't remain
parallel and we also learned that this is a new larger class of transformations which
we call protective transformations.
And the nice thing now is that we can describe this mapping using our framework with homogeneous
coordinates.
And here we derive that this perspective, if we have a very special setup or a simplified
setup where we already transformed the scene such that it's in the origin or that the camera
is in the origin and that we look, if we look along the set axis then this perspective projection
simply means dividing x and y coordinates by set and we can do that division with homogeneous
coordinates if we generate a matrix like this one, yeah, that looks very simple and the
important thing is that bottom line because that makes that after, if we take homogeneous
coordinates and we apply that matrix, the set goes to the homogeneous coordinate and
by de-homogenization, yeah, we divide by this set and this gives us exactly this perspective
division, yeah, this division that we want.
So we can, if we have homogeneous coordinates, we can describe this perspective mapping with
that very simple matrix.
And this brought us to, yeah, how now in general we define our matrices and usually just to
make things easier to understand or to handle it better, we separate it into two steps,
viewing and projection.
And the first one, viewing, is just a rigid transformation and it somehow, it positions
the camera in our scene and says in which direction are we looking into.
So that's just a rigid transformation, translation and rotation and after that, yeah, we are
in this setup, now we are looking along, yeah, the set axis and I told you that because usually
we use a right-handed coordinate system, we usually change the setup so that we look along
the negative set axis, yeah, and in that setup now we do the perspective projection.
And to this end, yeah, now we can even still use orthogonal projection, yeah, this is shown
here, now we are after viewing, we are in that setup, we look along the negative set
axis and now x and y span the image plane and now doing an orthogonal projection is
extremely simple because now we can simply take the x and the y coordinate of our point,
yeah, and consider these as image coordinates, yeah, now parallel projection just means projecting
parallel to the set axis so that just means, yeah, throwing away set, yeah, then we get
a 2D image, in fact, we don't throw away set because we will need it for occlusion later
on and the alternative is to do that perspective projection like here, yeah, and now this is
a little bit more complicated but in fact it is exactly the matrix that we have seen
before, yeah, it is just that the bottom row is a little bit simpler and then we get this
perspective projection here, yeah, so just by very taking two different very simple matrices
we can generate both of these projections, so this is the one, the matrix for the orthogonal
Presenters
Zugänglich über
Offener Zugang
Dauer
01:30:39 Min
Aufnahmedatum
2019-11-07
Hochgeladen am
2019-11-08 13:19:03
Sprache
de-DE